CC = g++
CFLAGS =  \
	-I /usr/include/php/ \
	-I /usr/include/php/main/ \
	-I /usr/include/php/Zend/ \
	-I /usr/include/php/TSRM/ \
	-Wall -g
#LDFLAGS = -L /home/colin/trunk/php/php5.4/php-5.4.13/libs/ -lphp5 -lpcap -Wl,-rpath,./
LDFLAGS = -L ./ -lphp5 -lpcap -Wl,-rpath,./
all: php_libc.cpp main.cpp
	$(CC) -o php_libc.o php_libc.cpp $(CFLAGS)
	$(CC) -o main.o main.cpp $(CFLAGS)
	g++ -o fsof_live main.cpp php_libc.cpp $(LDFLAGS)

fsof_captrue:main.cpp php_libc.cpp
	g++ -g -o $@ main.cpp php_libc.cpp $(CFLAGS) $(LDFLAGS)

libphp.so: php_libc.cpp
	g++ -g -o $@ $< -shared -fPIC $(CFLAGS) $(LDFLAGS)
